import time

def wait_for_pulse( pport ):
    '''
    Wait for a logical True (+3.3V) signal on pin 12 of the parallel port pport.  Poll
        for the True value as fast as possible.
    ''' 
    # set pin 2 to HIGH
    pport.setData(1)

    while not pport.getInPaperOut():
        pass
    # set all data ports to LOW
    pport.setData(0) 
